//package com.rabbitmq.topic.config;
//
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.Queue;
//import org.springframework.amqp.core.TopicExchange;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @Author: hualao
// * @Version: 0.0.1V
// * @Date: 2018/10/24
// * @Description: TOPIC模式配置
// **/
//@Configuration
//public class RabbitTopicConfigure {
//
//    public final static String message = "topic.message";
//    public final static String message2 = "topic.message2";
//    public final static String messages = "topic.messages";
//    public final static String exchange = "topicExchange";
//
//    @Bean
//    public Queue queueMessage() {
//        return new Queue(RabbitTopicConfigure.message);
//    }
//
//    @Bean
//    public Queue queueMessage2() {
//        return new Queue(RabbitTopicConfigure.message2);
//    }
//
//    @Bean
//    public Queue queueMessages() {
//        return new Queue(RabbitTopicConfigure.messages);
//    }
//
//    @Bean
//    TopicExchange exchange() {
//        return new TopicExchange(RabbitTopicConfigure.exchange);
//    }
//
//    @Bean
//    Binding bindingExchangeMessage(Queue queueMessage, TopicExchange exchange) {
//        return BindingBuilder.bind(queueMessage).to(exchange).with("topic.message");
//    }
//
//    @Bean
//    Binding bindingExchangeMessage2(Queue queueMessage2, TopicExchange exchange) {
//        return BindingBuilder.bind(queueMessage2).to(exchange).with("topic.message2");
//    }
//
//    @Bean
//    Binding bindingExchangeMessages(Queue queueMessages, TopicExchange exchange) {
//        return BindingBuilder.bind(queueMessages).to(exchange).with("topic.#");
//    }
//}
